package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.CityService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author huyuangui on 2016/7/18.
 */
@Service
public class CityServiceImpl extends BaseService implements CityService {

    /**
     * liuwb 2016-07-19 16:37
     * 功能:省份id获取省份信息
     * @param SRModel
     */
    @Override
    public SuperRecordModel findProvinceById(SuperRecordModel SRModel) {
        return getSqlSession().selectOne("CityMapper.findProvinceById",SRModel);
    }

    /**
     * liuwb 2016-07-19 16:34
     * 功能:获取全部省份信息
     */
    @Override
    public List<SuperRecordModel> findAllProvince() {
        return getSqlSession().selectList("CityMapper.findAllProvince");
    }

    /**
     * liuwb 2016-07-19 16:39
     * 功能:根据省份id获取【市】列表信息
     */
    @Override
    public List<SuperRecordModel> findCityListByFather(SuperRecordModel SRModel) {
        return getSqlSession().selectList("CityMapper.findCityListByFather",SRModel);
    }

    /**
     * liuwb 2016-07-19 16:39
     * 功能:根据市id获取【区】列表信息
     */
    @Override
    public List<SuperRecordModel> findAreaListByFather(SuperRecordModel SRModel) {
        return getSqlSession().selectList("CityMapper.findAreaListByFather",SRModel);
    }


}
